﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GnufButtonToolDefinition.h"
#include "GnufDropdownMenuToolDefinition.h"

namespace gnuf {
    
    class GNUF_BASE_EXPORT ButtonToolDefinitionEx final : public ButtonToolDefinition
    {
    public:
        ButtonToolDefinitionEx(const wchar_t *, bool, gcmp::OwnerPtr<Info> &);
        ~ButtonToolDefinitionEx();
        // Inherits from IButtonControlHandler...
        virtual void onClicked() override;
    };

#define GNUF_BUTTON_TOOL(ClassName, Interactive, CommandId, Caption, ToolTip, IconDir) \
    static gnuf::ButtonToolDefinitionEx s_buttonTool##ClassName ( \
        CommandId, \
        Interactive, \
        NEW_AS_OWNER_PTR( \
            gnuf::Info, \
            Caption, \
            ToolTip, \
            IconDir \
        ) \
    );

#define GNUF_DROPDOWN_MENU_TOOL(ClassName, CommandId, Caption, ToolTip, IconDir) \
    static gnuf::DropdownMenuToolDefinition s_##ClassName ( CommandId, \
        NEW_AS_OWNER_PTR( gnuf::Info, \
            Caption, \
            ToolTip, \
            IconDir \
    ) );
}
